<?php
/* @var $this ArticleController */
/* @var $model Article */

$this->breadcrumbs=array(
	'Articles'=>array('index'),
	$model->title,
);

$this->menu=array(
	array('label'=>'List Article', 'url'=>array('index')),
	array('label'=>'Create Article', 'url'=>array('create')),
	array('label'=>'Update Article', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete Article', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Article', 'url'=>array('admin')),
);
?>
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
    <ul class="breadcrumb">
        <li><i class="ace-icon fa fa-home home-icon"></i><a href="<?=$this->createUrl('default/index')?>">首页</a></li>
        <li><a href="<?=$this->createUrl('article/index')?>">内容</a></li>
        <li class="active">内容详情</li>
    </ul><!-- /.breadcrumb -->
    <div class="nav-search" id="nav-search">
        <form class="form-search">
            <span class="input-icon">
                <input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
                <i class="ace-icon fa fa-search nav-search-icon"></i>
            </span>
        </form>
    </div><!-- /.nav-search -->
</div><!-- /.breadcrumbs -->
<div class="page-content">
    <div class="page-header">
        <h1>内容详情
            <small><i class="ace-icon fa fa-angle-double-right"></i> Article Information</small>
            <small><a class="btn btn-info btn-round btn-xs" href="<?=$this->createUrl('article/index')?>">返回</a></small>
        </h1>
    </div><!-- /.page-header -->
    <div class="row">
        <div class="col-xs-12">
            <!-- PAGE CONTENT BEGINS -->
            <?php $this->widget('zii.widgets.CDetailView', array(
                'data'=>$model,
                'attributes'=>array(
                    'id',
                    'cid'=>array('name'=>'cid','value'=>function($model){return Category::model()->findByPk($model->cid)->name;}),
                    //'type'=>array('name'=>'type','value'=>function($model){return /*Constants::getCategoryTypeItems($model->type)*/;}),
                    'title',
                    'sub_title',
                    'summary',
                    'thumb'=>array(
                        'name'=>'thumb',
                        'value'=>CHtml::image($model->thumb,'缩微图',array('width'=>'200px')),
                        'type'=>'raw', //原样输出HTML
                    ),
                    'seo_title',
                    'seo_keywords',
                    'seo_description',
                    'status'=>array('name'=>'status','value'=>function($model){return Constants::getArticleStatus($model->status);}),
                    'sort',
                    'author_id',
                    'author_name',
                    'scan_count',
                    'comment_count',
                    'can_comment'=>array('name'=>'can_comment','value'=>function($model){return Constants::getYesNoItems($model->can_comment);}),
                    'visibility'=>array('name'=>'visibility','value'=>function($model){return Constants::getYesNoItems($model->visibility);}),
                    'password',
                    'flag_headline'=>array('name'=>'flag_headline','value'=>function($model){return Constants::getYesNoItems($model->flag_headline);}),
                    'flag_recommend'=>array('name'=>'flag_recommend','value'=>function($model){return Constants::getYesNoItems($model->flag_recommend);}),
                    'flag_slide_show'=>array('name'=>'flag_slide_show','value'=>function($model){return Constants::getYesNoItems($model->flag_slide_show);}),
                    'flag_special_recommend'=>array('name'=>'flag_special_recommend','value'=>function($model){return Constants::getYesNoItems($model->flag_special_recommend);}),
                    'flag_roll'=>array('name'=>'flag_roll','value'=>function($model){return Constants::getYesNoItems($model->flag_roll);}),
                    'flag_bold'=>array('name'=>'flag_bold','value'=>function($model){return Constants::getYesNoItems($model->flag_bold);}),
                    'flag_picture'=>array('name'=>'flag_picture','value'=>function($model){return Constants::getYesNoItems($model->flag_picture);}),
                    'template',
                    'content'=>array(
                        'name'=>'content',
                        'type'=>'raw',
                        'value'=>function($model){return $model->content;}
                    ),
                    'created_at'=>array('name'=>'created_at','value'=>function($model){return date('Y-m-d H:i:s', $model->created_at);}),
                    'updated_at'=>array('name'=>'updated_at','value'=>function($model){return date('Y-m-d H:i:s', $model->updated_at);}),
                ),
            )); ?>
            <!-- PAGE CONTENT ENDS -->
        </div><!-- /.col -->
    </div><!-- /.row -->
</div><!-- /.page-content -->


